#pragma once

#include <QLabel>
#include <qpropertyanimation.h>

class RootContactItem : public QLabel
{
	Q_OBJECT

	Q_PROPERTY(int rotation READ getRotation WRITE saveRotation)

public:
	RootContactItem(bool hasArrow,QWidget *parent);
	~RootContactItem();

	int getRotation();
	void saveRotation(int r);

	void setTitleText(const QString& text);
	void setExpand(bool expand);

protected:
	void paintEvent(QPaintEvent* event) override;

private:
	void init();

private:
	int m_rotation;
	bool m_hasArrow;
	QString m_titleText;

	QPropertyAnimation* anime = NULL;
};
